﻿@page "/ModbusMaster"
@using BootstrapBlazor.Components
@using ThingsGateway.Core.Extension
@using ThingsGateway.Foundation
@using ThingsGateway.Foundation.Modbus
@namespace ThingsGateway.Debug
@using TouchSocket.Core


<div style="height:100%; width:100%;">
    <ChannelDataDebugComponent OnConnectClick="OnConnectClick" OnDisConnectClick="OnDisConnectClick" OnConfimClick="OnConfimClick"/>

    @if (_plc != null)
    {
        <Card class="mt-2">
            <BodyTemplate>

                <EditorForm Model="_plc" AutoGenerateAllItem=false RowType="RowType.Inline" ItemsPerRow="4" ShowLabelTooltip="true" ShowLabel="true">
                    <FieldItems>

                        <EditorItem @bind-Field=context.ModbusType />
                        <EditorItem @bind-Field=context.ConnectTimeout />
                        <EditorItem @bind-Field=context.Station />
                        <EditorItem @bind-Field=context.DtuId />
                        <EditorItem @bind-Field=context.CheckClearTime />
                        <EditorItem @bind-Field=context.HeartbeatHexString />
                        <EditorItem @bind-Field=context.CacheTimeout />
                        <EditorItem @bind-Field=context.DataFormat />
                        <EditorItem @bind-Field=context.SendDelayTime />
                        <EditorItem @bind-Field=context.Timeout />
                        <EditorItem @bind-Field=context.IsStringReverseByteWord />

                    </FieldItems>

                </EditorForm>
            </BodyTemplate>
        </Card>

    }

    <AdapterDebugComponent Plc=_plc LogPath=@LogPath @ref=AdapterDebugComponent ></AdapterDebugComponent>
</div>


